      SUBROUTINE SETUP
      RETURN
      END
C   HS116
      BLOCK DATA
      INCLUDE 'BLOCO.INC'
      INTEGER I,J
      DATA NAME/'HS116'/
      DATA (X(I),I=1,13)
     F        / .5D0,.8D0,.9D0,.1D0,.14D0,.5D0,.489D0,.08D0,.65D0,
     F        .45D0,3*1.5D0/
      DATA N/13/ , NH/0/ , NG/41 /
      DATA DEL0/.050D0/ ,TAU0/.050D0/ ,TAU/.1D0/
      DATA (GUNIT(1,I),I=1,26)/26*1/,(GUNIT(3,I),I=1,13)/13*1/,
     F     (GUNIT(3,I),I=14,26)/13*-1/,(GUNIT(2,I),I=1,26)/1,2,3,4,
     F     5,6,7,8,9,10,11,12,13,1,2,3,4,5,6,7,8,9,10,11,12,13/,
     F     (GUNIT(1,I),I=27,41)/15*-1/,((GUNIT(I,J),I=2,3),J=27,41)
     F     /30*0/
      END
      SUBROUTINE EF(X,FX)
      INCLUDE 'FUCO.INC'
      DOUBLE PRECISION X(NX),FX
      ICF=ICF+1
      FX=(X(11)+X(12)+X(13))
      RETURN
      END
      SUBROUTINE EGRADF(X,GRADF)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),GRADF(NX)
      ICGF=ICGF+1
      DO      100      I=1,N
      GRADF(I)=0.D0
  100 CONTINUE
      GRADF(11)=1.D0
      GRADF(12)=1.D0
      GRADF(13)=1.D0
      RETURN
      END
      SUBROUTINE EH(I,X,HXI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),HXI
      CRES(I)=CRES(I)+1
      RETURN
      END
      SUBROUTINE EGRADH(I,X,GRADHI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),GRADHI(NX)
      CGRES(I)=CGRES(I)+1
      RETURN
      END
      SUBROUTINE EG(I,X,GXI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION GXI
      DOUBLE PRECISION X(NX)
      DOUBLE PRECISION  US(13),OS(13),C1,C2,C3,C4,C5,C6
      SAVE C1,C2,C3,C4,C5,C6,US,OS
      DATA C1/.03475D0/,C2/.975D0/,C3/.00975D0/,C4/6.31313D0/,
     1     C5/6.155295D0/,C6/2.D0  /
      DATA US/3*.1D0,1.D-3,2*.1D0,2*1.D-4,0.D0,2.D-4,1.D-2,2*1.D-6 /
      DATA OS/4*1.D0,2*.9D0,4*1.D0,3*1.5D0/
      IF ( GUNIT(1,I+NH) .EQ. -1 )CRES(I+NH)=CRES(I+NH)+1
      IF(I .GT. 26)     GOTO 20
      IF(I .GT. 13)     GOTO 10
      GXI=X(I)-US(I)
      RETURN
 10   CONTINUE
      GXI=OS(I-13)-X(I-13)
      RETURN
 20   CONTINUE
      GOTO (100,200,300,400,500,600,700,800,900,1000,1100,1200,1300,
     1        1400,1500),I-26
  100 CONTINUE
      GXI=X(13)-C4*X(10)+C5*X(3)*X(10)
      RETURN
  200 CONTINUE
      GXI=X( 5)-C1*X( 2)-C2*X(2)*X( 5)+C3*X(2)**2
      RETURN
  300 CONTINUE
      GXI=X(6)-C1*X(3)-C2*X(3)*X(6)+C3*X(3)**2
      RETURN
  400 CONTINUE
      GXI=X( 5)*X(7) -X(1)*X( 8)-(X(4)*X(7)-X(4)*X(8))*.1D0
      RETURN
  500 CONTINUE
      GXI=1.D0-X(5)-X(2)-C6*(X(2)*X(9)*.5D0+X(5)*X(8)-X(1)*X(8)-X(6)*
     1       X(9)*.5D0)   
      RETURN
  600 CONTINUE
      GXI=X(2)*X(9)-X(3)*X(10)-X(6)*X(9)
     1              +X(2)*X(10)
      RETURN
  700 CONTINUE
      GXI=X(2)-.9D0-C6*X(10)*(X(2)-X(3))*.5D0
      RETURN
  800 CONTINUE
      GXI=X(4)*.1D0-C1*X(1)-C2*X(1)*X(4)*.1D0+C3*X(1)**2
      RETURN
  900 CONTINUE
      GXI=X(11)-C4*X(8)*2.D0+C5*X(1)*X(8)*2.D0
      RETURN
 1000 CONTINUE
      GXI=X(12)-C4*X(9)+C5*X(2)*X(9)-C4+C5*X(2)
      RETURN
 1100 CONTINUE
      GXI=X(3)-X(2)
      RETURN
 1200 CONTINUE
      GXI=X(2)-X(1)
      RETURN
 1300 CONTINUE
      GXI=1.D0-C6*X(7)+C6*X(8)
      RETURN
 1400 CONTINUE
      GXI=X(11)+X(12)+X(13)-.5D0
      RETURN
 1500 CONTINUE
      GXI=2.5D0-(X(11)+X(12)+X(13))
      RETURN
      END
      SUBROUTINE EGRADG(I,X,GRADGI)
      INCLUDE 'FUCO.INC'
      INTEGER I,J
      DOUBLE PRECISION X(NX),GRADGI(NX)
      DOUBLE PRECISION  C1,C2,C3,C4,C5,C6
      SAVE C1,C2,C3,C4,C5,C6
      DATA C1/.03475D0/,C2/.975D0/,C3/.00975D0/,C4/6.31313D0/,
     1     C5/6.155295D0/,C6/2.D0  /
      IF ( GUNIT(1,I+NH) .EQ. 1 ) RETURN 
      CGRES(I+NH)=CGRES(I+NH)+1
      DO      10      J=1,N
      GRADGI(J)=0.D0
 10   CONTINUE
      IF(I .GT. 26)      GOTO 30
      IF(I .GT. 13)      GOTO 20
      GRADGI(I)=1.D0
      RETURN
 20   CONTINUE
      GRADGI(I-13)=-1.D0
      RETURN
 30   CONTINUE
      GOTO (100,200,300,400,500,600,700,800,900,1000,1100,1200,1300,
     1      1400,1500),I-26
  100 CONTINUE
      GRADGI(3)=C5*X(10)
      GRADGI(10)=-C4+C5*X(3)
      GRADGI(13)=1.D0
      RETURN
  200 CONTINUE
      GRADGI(2)=-C1-C2*X(5)+2.D0*C3*X(2)
      GRADGI( 5)=1.D0-C2*X(2)
      RETURN
  300 CONTINUE
      GRADGI(3)=-C1-C2*X(6)+2.D0*C3*X(3)
      GRADGI( 6)=1.D0-C2*X(3)
      RETURN
  400 CONTINUE
      GRADGI(1)=-X(8)
      GRADGI(4)=(X(8)-X(7))*.1D0
      GRADGI(5)= X(7)
      GRADGI(7)= X(5)-X(4)*.1D0
      GRADGI(8)=.1D0* X(4)-X(1)
      RETURN
  500 CONTINUE
      GRADGI(1)=C6*X(8)
      GRADGI(2)=-C6*X(9)*.5D0-1.D0
      GRADGI( 5)=-1.D0-C6*X(8)
      GRADGI( 6)=C6*X(9)*.5D0
      GRADGI(8)=C6*(  X(1)-X(5))
      GRADGI(9)=C6*(  X(6)-X(2))*.5D0
      RETURN
  600 CONTINUE
      GRADGI(2)=X(9)+X(10)
      GRADGI(3)=-X(10)
      GRADGI(6)=       -X(9)
      GRADGI(9)=X(2)-X( 6)
      GRADGI(10)=X(2)-X( 3)
      RETURN
  700 CONTINUE
      GRADGI( 2)= 1.D0-C6*X(10)*.5D0
      GRADGI(3)=C6*X(10)*.5D0
      GRADGI(10)=-C6*(X(2)-X( 3))*.5D0
      RETURN
  800 CONTINUE
      GRADGI(1)=-C1-C2*X(4)*.1D0 +2.D0*C3* X(1)
      GRADGI( 4)=(1.D0-C2*X(1))*.1D0
      RETURN
  900 CONTINUE
      GRADGI(1)=C5*X(8)*2.D0
      GRADGI(8)=(C5*X(1)-C4)*2.D0
      GRADGI(11)=1.D0
      RETURN
 1000 CONTINUE
      GRADGI(2)=C5*X(9)+C5
      GRADGI(9)=C5*X(2)-C4
      GRADGI(12)=1.D0
      RETURN
 1100 CONTINUE
      GRADGI(2)=-1.D0
      GRADGI(3 )= 1.D0
      RETURN
 1200 CONTINUE
      GRADGI(2 )= 1.D0
      GRADGI(1 )=-1.D0
      RETURN
 1300 CONTINUE
      GRADGI(7)=-C6
      GRADGI(8)=C6
      RETURN
 1400 CONTINUE
      GRADGI(11)= 1.D0
      GRADGI(12)= 1.D0
      GRADGI(13)= 1.D0
      RETURN
 1500 CONTINUE
      GRADGI(13)=-1.D0
      GRADGI(12)=-1.D0
      GRADGI(11)=-1.D0
      RETURN
      END
